using IQIGame.Onigao.Framework;
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEditor;
using UnityEditor.UIElements;
using UnityEngine;
using UnityEngine.UIElements;

namespace IQIGame.Onigao.Game.Editors
{
    [CustomEditor(typeof(EntityManager))]
    public class EntityManagerInspector : UnityEditor.Editor
    {
        [SerializeField]
        private VisualTreeAsset m_InspectorXML;

        public override VisualElement CreateInspectorGUI()
        {
            serializedObject.Update();

            // Create a new VisualElement to be the root of our inspector UI
            VisualElement myInspector = new VisualElement();

            m_InspectorXML.CloneTree(myInspector);

            serializedObject.ApplyModifiedProperties();
            // Return the finished inspector UI
            return myInspector;
        }
    }
}
